<template>
	<uni-popup ref="Compopup" type="bottom" :maskClick="false">
		<view class="popup-bottom-box">
			<view class="title font14 font-b tc">{{title}}</view>
			<view class="content">
				<slot></slot>
			</view>
			<view
				class="btn flex-row-center font14 font-ffffff"
				:style="{'margin': btnMargin}"
				@tap="onClose"
			>关闭</view>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		props: {
			// 弹窗标题
			title: {
				type: String,
				default: ''
			},
			// 按钮间距
			btnMargin: {
				type: String,
				default: '100rpx auto 90rpx'
			},
		},
		data() {
			return {
			};
		},
		methods: {
			// 打开
			Onopen() {
				this.$refs.Compopup.open()
			},
			// 关闭
			onClose() {
				this.$refs.Compopup.close()
			}
		}
	}
</script>

<style lang="less" scoped>
	@import '@/common/css/variables.less';
	.popup-bottom-box{
		background-color: #fff;border-radius: 10rpx 10rpx 0 0;overflow: hidden;
		.title{padding: 34rpx 0 45rpx;line-height: 30rpx;}
		.content{ padding: 0 25rpx; }
		.btn{width: 500rpx;height: 75rpx;line-height: 75rpx;background-color: @theme-color;border-radius: 38rpx;margin: 100rpx auto 90rpx;}
	}
</style>
